]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
portalHelper: Fix handling of invalid TLS certificates
authorSebastian Keller <skeller@gnome.org>
Thu, 25 Apr 2024 17:33:09 +0000 (19:33 +0200)
committerSebastian Keller <skeller@gnome.org>
Thu, 25 Apr 2024 17:33:09 +0000 (19:33 +0200)
WebKitGTK 6.0 moved allow_tls_certificate_for_host() from WebContext to
NetworkSession. This was not adjusted here when the portal helper was
switched from 4.0 to 6.0.

https://github.com/WebKit/WebKit/commit/2d1b53b211b43047b94b7d2ef8a3907f00e724fb

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7597
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3284>

js/portalHelper/main.js

index 7000089fa73432ffa4e79e23f4b84c49c45fc3e4..1716dc979674398226777d5cc5f13ad0b9779d0e 100644 (file)
@@ -207,7 +207,7 @@ class PortalWindow extends Gtk.ApplicationWindow {
     _onLoadFailedWithTlsErrors(view, failingURI, certificate, _errors) {
         this._secureMenu.setSecurityIcon(PortalHelperSecurityLevel.INSECURE);
         let uri = GLib.Uri.parse(failingURI, HTTP_URI_FLAGS);
-        this._webContext.allow_tls_certificate_for_host(certificate, uri.get_host());
+        this._networkSession.allow_tls_certificate_for_host(certificate, uri.get_host());
         this._webView.load_uri(failingURI);
         return true;
     }